﻿using System.Collections.Generic;
using Gp.Scripts.Core;

namespace Gp.Scripts.Equip {
    public class ShieldArmorEntity : IArmorProvider {
        public ShieldWeaponInfo ShieldInfo { get; }
        private ArmorFragmentEntity _fragment;

        public IEnumerable<ArmorFragmentEntity> ArmorFragments {
            get {
                yield return _fragment;
            }
        }

        public ShieldArmorEntity(ShieldWeaponInfo shieldInfo, BaseUnit unit) {
            ShieldInfo = shieldInfo;
            _fragment = new ArmorFragmentEntity(this, () => shieldInfo.WeaponType.defencePoint, 1, true);
        }
    }
}